Skip to content

feat: contribute aws eks resource detector #1479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yiyuan-he
Copy link
Contributor

@yiyuan-he yiyuan-he commented Apr 11, 2025

What does this pull request do?

Adds functionality for AWS EKS resource detection in AWS resource detector gem. It is similar to the implementation for Python.

This feature is branched off PR.

Related issues

#34

@yiyuan-he yiyuan-he force-pushed the contribute-eks-resource-detector branch 2 times, most recently from cba8900 to ee6ba6f Compare April 11, 2025 22:34
@yiyuan-he yiyuan-he changed the title feat: contribute aws eks resource detector [WIP] feat: contribute aws eks resource detector Apr 23, 2025
@yiyuan-he yiyuan-he marked this pull request as draft April 23, 2025 23:32
@yiyuan-he yiyuan-he force-pushed the contribute-eks-resource-detector branch from 17b1826 to 8787fea Compare May 14, 2025 04:01
@yiyuan-he yiyuan-he force-pushed the contribute-eks-resource-detector branch from dc4076c to eacac6a Compare May 14, 2025 04:25
@yiyuan-he yiyuan-he marked this pull request as ready for review May 14, 2025 15:51
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great! thanks @yiyuan-he

one comment about the error handlers vs. logs

I was wrong about the error handlers! Failure to detect should not be an error log.

See #1538

it 'returns an empty resource with unknown detector' do
assert_detection_result([:unknown])
end

it 'returns an empty resource with multiple detectors when all fail' do
assert_detection_result(%i[ec2 ecs unknown])
assert_detection_result(%i[ec2 ecs eks lambda unknown])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Copy link
Contributor Author

@yiyuan-he yiyuan-he May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay no worries. In that case, i'll keep this EKS detector as is since it's already using debug logs and update the other detectors. Left a comment in that issue as well.

EDIT: Meant to leave this reply in the other thread.

request = case method.upcase
when 'GET'
Net::HTTP::Get.new(uri)
when 'POST'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am I missing something here. Is there a case where POST is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out Ariel - POST should not be used. Pushed a commit to clean up this dead code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants